package com.ship.job.task;

import com.ship.system.api.RemoteDispatchService;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.stereotype.Component;

import javax.annotation.Resource;

/**
 * 合同相关定时器
 */
@Component("commonTask")
public class CommonTask {
    private static final Logger logger = LoggerFactory.getLogger(CommonTask.class);
    @Resource
    private RemoteDispatchService remoteDispatchService;

    public void doShipCrewStatus()
    {
        logger.info("开始执行船员上下船状态同步=============");
        //船员上下船
        remoteDispatchService.checkShipCrewStatus();
        //首页大屏缓存更新
        remoteDispatchService.homeStatisticsCacheUpdate();
        //数据看板缓存更新
        remoteDispatchService.reportItemCacheUpdate();
        //港口第三方id数据更新
        remoteDispatchService.portRouteRelationUpdate();
        logger.info("结束执行船员上下船状态同步=============");
    }
}
